<!DOCTYPE html>
<html>
<head>
    <meta http-equiv="Content-Type" content="text/html; charset="utf-8">
    <title>Title</title>
    <style>
        body{
            margin:0px!important;
            padding:8px;
            text-align: center;
        }
        #bao{
            text-align: center;
            overflow: hidden;
        }
        table{
            border-right:20px solid #fff;
            border-left:20px solid #fff;
            width:100%;
            background: #fff;
            text-align: left;
        }
        #arraydata{
            height:543px!important;
        }
        textarea{
            width:99%;
            min-height:50px;
            paddin:5px;
            font-size:11px;
        }
        td.th{
            font-size:13px;
        }
        td.tdv{
            font-size:12px;
        }
        div#surl{
            width:745px;
            height:36px;
            overflow:auto;
        }
        </style>
    <script src="../../js/jquery.js"></script>
    <script src="../../js/layer/layer.js"></script>
    <script>
        var data;
        $(document).ready(function(){
            data = JSON.parse(localStorage.getItem('data'));
            $(".gathertype").text($("#gather_type",parent.window.document).val())
            $("#s_url").text(encodeURIComponent($("#s_url",parent.window.document).val()))
            $(".host").text($("#thishost",parent.window.document).val())
            $("#json").val(localStorage.getItem('data'));
            $(".layui-layer-title",parent.window.document).css("background"," transparent url("+$("#faceimg",parent.window.document).val()+") top right no-repeat");
            $(".layui-layer-content",parent.window.document).css("background"," transparent url("+$("#faceimg",parent.window.document).val()+") top left repeat");
            $.ajax({
                'type':'POST',
                'timeout':20000,
                'url':"//"+window.location.hostname+'/collect/node.php',
                'dataType':"html",
                'data':{"html":$("#json").val()},
                'success':function(str2){
                    $("#arraydata").val(str2);
                 }
            });
        })
    </script>
</head>
<body>
 <div id="bao">
    <table id="table">
        <tr>
            <td class="th">接口地址:</td>
        </tr>
        <tr>
            <td class="tdv">
            http://{{host}}/collect/index.php?gather_type=<span class="gathertype"></span>&s_url={{soureURL}}}
            <br>(备注:{{host}}为服务器域名，注意{{soureURL}}}为URLencode过后的抓取源网址)
        </td>
        </tr>
        <tr>
            <td class="th"><br>本实例抓取接口地址:</td>
        </tr>
        <tr>
            <td class="tdv"><div id="surl" contentedittable="ture">http://<span class="host"></span>/collect/index.php?gather_type=<span class="gathertype"></span>&s_url=<span id="s_url"></span></div></td>
        </tr>
        <tr>
            <td class="th"><br>本实例返回JSON数据:</td>
        </tr>
        <tr>
           <td class="tdv">
            <textarea id="json"></textarea>
        </td>
        </tr>
        <tr>
            <td class="th"><br>本实例返回Array数组样式:</td>
        </tr>
        <tr>
            <td class="tdv"><textarea id="arraydata"></textarea></td>
        </tr>
    </table>
 </div>
</body>
</html>